package org.yu.team2023.flashdays.registries;

import net.minecraft.core.BlockPos;
import net.minecraft.data.PackOutput;

import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProviderType;
import net.minecraftforge.client.model.generators.BlockModelProvider;
import net.minecraftforge.client.model.generators.BlockStateProvider;
import net.minecraftforge.common.data.ExistingFileHelper;

import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Supplier;

public class SimpleBlockStateProvider extends BlockStateProvider {
    protected final Map<Supplier<? extends Block>, BiConsumer<Supplier<? extends Block>,SimpleBlockStateProvider>> map;

    public SimpleBlockStateProvider(PackOutput output, String modid, ExistingFileHelper exFileHelper,Map<Supplier<? extends Block>, BiConsumer<Supplier<? extends Block>,SimpleBlockStateProvider>> map) {
        super(output, modid, exFileHelper);
        this.map=map;
    }

    @Override
    protected void registerStatesAndModels() {
        map.forEach((supplier, supplierSimpleBlockStateProviderBiConsumer) -> supplierSimpleBlockStateProviderBiConsumer.accept(supplier, SimpleBlockStateProvider.this));
    }
}
